Returns all installed cameras (CM3x), vehicle gateways (VGs), and asset gateways (AGs) and their health information within an organization.
Beta: This endpoint is in beta and is likely to change before being broadly available. Reach out to your Samsara Representative to have Devices API enabled for your organization.
Rate limit: 5 requests/sec (learn more about rate limits here).
To use this endpoint, select Read Devices under the Devices category when creating or editing an API token. Learn More.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
curl --request GET \
--url https://api.samsara.com/devices \
--header 'Authorization: Bearer <token>'{
"data": [
{
"asset": {
"id": "281474982859091",
"name": "MyAsset-1234"
},
"model": "AG24",
"serial": "ABCD-123-EFG",
"health": {
"healthDetails": {
"cameraDetails": {
"gatewayLastConnectedTime": "2019-06-13T19:08:25Z",
"lastFiftyHoursUptimePercentage": 95.5,
"vehicleGatewaySerial": "VG-1234-5678"
},
"gatewayDetails": {
"cellConnectivity": {
"operator": "AT&T",
"signalBar": "1/4"
},
"gatewayBatteryState": "critical",
"gatewayBatteryTemp": 25.5,
"gatewayBatteryVolts": 12.5,
"lastCheckInTime": "2019-06-13T19:08:25Z",
"vehicleBatteryVolts": 12.5
}
},
"healthReasons": [
{
"healthReasonCode": "assetUnplugged",
"startTime": "2019-06-13T19:08:25Z"
}
],
"healthStatus": "dataPending",
"primaryHealthReason": "assetUnplugged",
"primaryHealthReasonStartTime": "2019-06-13T19:08:25Z",
"recommendedAction": "recommendedActionAgHealthy"
},
"lastConnectedTime": "2019-06-13T19:08:25Z",
"lastKnownLocation": {
"id": 12345,
"latitude": 12333122.3,
"longitude": 1233331.4
},
"tags": [
{
"id": "3914",
"name": "East Coast",
"parentTagId": "4815"
}
]
}
],
"pagination": {
"endCursor": "MjkY",
"hasNextPage": true
}
}Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Optional string of comma separated device models. Valid values: CM31, CM32, CM33, CM34, VG34, VG34M, VG34EU, VG34FN, VG54NA, VG54EU, VG55NA, VG55EU, AG24, AG24EU, AG26, AG26EU, AG45, AG45EU, AG46, AG46EU, AG46P, AG46PEU, AG51, AG51EU, AG52, AG52EU, AG53, AG53EU
Optional string of comma separated device health statuses. Valid values: healthy, needsAttention, needsReplacement, dataPending.
Optional boolean to control whether device health information is returned in the response. Defaults to false.
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
The limit for how many objects will be in the response. Default and max for this value is 100 objects.
1 <= x <= 100Optional boolean to control whether tags are returned in the response. Defaults to false.
A filter on the data based on this comma-separated list of tag IDs. Example: tagIds=1234,5678
A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: parentTagIds=345,678
curl --request GET \
--url https://api.samsara.com/devices \
--header 'Authorization: Bearer <token>'{
"data": [
{
"asset": {
"id": "281474982859091",
"name": "MyAsset-1234"
},
"model": "AG24",
"serial": "ABCD-123-EFG",
"health": {
"healthDetails": {
"cameraDetails": {
"gatewayLastConnectedTime": "2019-06-13T19:08:25Z",
"lastFiftyHoursUptimePercentage": 95.5,
"vehicleGatewaySerial": "VG-1234-5678"
},
"gatewayDetails": {
"cellConnectivity": {
"operator": "AT&T",
"signalBar": "1/4"
},
"gatewayBatteryState": "critical",
"gatewayBatteryTemp": 25.5,
"gatewayBatteryVolts": 12.5,
"lastCheckInTime": "2019-06-13T19:08:25Z",
"vehicleBatteryVolts": 12.5
}
},
"healthReasons": [
{
"healthReasonCode": "assetUnplugged",
"startTime": "2019-06-13T19:08:25Z"
}
],
"healthStatus": "dataPending",
"primaryHealthReason": "assetUnplugged",
"primaryHealthReasonStartTime": "2019-06-13T19:08:25Z",
"recommendedAction": "recommendedActionAgHealthy"
},
"lastConnectedTime": "2019-06-13T19:08:25Z",
"lastKnownLocation": {
"id": 12345,
"latitude": 12333122.3,
"longitude": 1233331.4
},
"tags": [
{
"id": "3914",
"name": "East Coast",
"parentTagId": "4815"
}
]
}
],
"pagination": {
"endCursor": "MjkY",
"hasNextPage": true
}
}